import request from '@/utils/request'

// 查询学习库分类树列表
export function listLearncategory(query) {
  return request({
    url: '/customer/learncategory/list',
    method: 'get',
    params: query
  })
}

// 查询学习库分类树详细
export function getLearncategory(learnCategoryId) {
  return request({
    url: '/customer/learncategory/' + learnCategoryId,
    method: 'get'
  })
}

// 新增学习库分类树
export function addLearncategory(data) {
  return request({
    url: '/customer/learncategory',
    method: 'post',
    data: data
  })
}

// 修改学习库分类树
export function updateLearncategory(data) {
  return request({
    url: '/customer/learncategory',
    method: 'put',
    data: data
  })
}

// 删除学习库分类树
export function delLearncategory(learnCategoryId) {
  return request({
    url: '/customer/learncategory/' + learnCategoryId,
    method: 'delete'
  })
}

// 查询学习库分类树列表
export function getLearncategoryTree() {
  return request({
    url: '/customer/learncategory/categoryTree',
    method: 'get'
  })
}
